from django.db import models
import  datetime
from django.utils import timezone
# Create your models here.

class User(models.Model):
    """
    用户表
    """
    username = models.CharField(max_length=30,verbose_name='用户名')
    phone = models.CharField('手机号',max_length=11)
    password = models.CharField('密码',max_length=369,)
    created_time = models.DateTimeField('注册时间',default=timezone.now)
    last_login = models.DateTimeField("登录时间",default=timezone.now)

    class Meta:
        db_table = 'tb_user'

    def __str__(self):
        return self.username